#ifndef SCORE_TOPPLE_CONTROL___
#define SCORE_TOPPLE_CONTROL___

#include "Player.h"
#include "PlayState.h"

#define STO_DEFAULT_SCORE (50)

class ScoreToppleControl
{
    typedef struct ScoreToppleObjectData {
        Ogre::Quaternion initial_orientation;
        int score_amount;
        bool done;
    } ScoreToppleObjectData;

    std::map<OgreNewt::Body *, ScoreToppleObjectData> score_topple_objects;
    Player *player;
    PlayState *play_state;
    
public:
    ScoreToppleControl();
    ScoreToppleControl *clone();
    void reset();
    void addScoreToppleObject(OgreNewt::Body *body, std::map<Ogre::String, Ogre::String> &params);
    void setPlayer(Player *pl) { player = pl; }
    void setPlayState(PlayState *ps) { play_state = ps; }
    void collision(OgreNewt::Body *object);
    bool isToppled(Ogre::Quaternion &initial, Ogre::Quaternion &current);
};

#endif
